home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Newton / slurpee-11 / mac / Slurpee.txt < prev   
Encoding:
Text File  |  1994-10-01  |  11.8 KB  |  297 lines  |  [TEXT/R*ch]

  1. Slurpee.txt
  2. 9/3/94
  3.  
  4. Slurpee 1.1
  5. transfers paragraphs or tab-delimited text
  6. between a text file and Newton soup entries
  7. via a terminal emulator and serial connection
  8.  
  9. see Slurpee.1st for other info.
  10.  
  11.  
  12. =====
  13. Why?
  14.  
  15. I wanted a convenient way to move information from the desktop to soups on the
  16. Newton, especially text paragraphs to separate Notepad entries, and vice
  17. versa.  Newton Connection Kit (NCK) is also a possibility, though it is
  18. slower, more complicated, and expensive.  Although Slurpee was created
  19. primarily to support moving NewtonScript application/method sources by users
  20. of my Newt application development tool, I thought that this utility may be
  21. useful for others as well.
  22.  
  23.  
  24. =====
  25. Slurp and Slurpee -- Introduction and Differences
  26.  
  27. Slurpee is a customized version of the Apple DTS "Slurp-3" example -- with
  28. thanks to the original author Scott (Zz) Zimmerman. The original Slurp
  29. documentation and examples are included as SlurpOld.txt and CasioNam.tab. I
  30. did not include the Slurp NTK project source files -- these can be obtained
  31. from AppleLink and ftp.apple.com (Slurp may have been superceded by the
  32. SuperSlurp example).
  33.  
  34. Slurp: Copyright 1993, 1994, Apple Computer, All Rights Reserved.
  35. Slurpee modifications: Copyright 1994, S. Weyer
  36.  
  37. Slurpee is freeware (especially since so much of it is based on Slurp). Slurpee
  38. may be freely distributed via online services and bulletin boards if it is
  39. unmodified and includes this and other files mentioned here.  It may not be
  40. commercially bundled or redistributed on CD-ROM, floppy disk, PCMCIA, networks
  41. or other media without permission.
  42.  
  43. With enough encouragement, I may fix problems and add additional features. Of
  44. course, you can also start with the original Slurp and roll your own version.
  45. If Slurpee is useful to you, you can send email or a postcard, or better yet,
  46. you can express your appreciation by registering for "Newt". Newt is a
  47. shareware native Newton application development environment, i.e., you can
  48. build applications in NewtonScript on your Newton.  In particular, I distribute
  49. Newt source for Slurpee if you would like to make your own version or understand
  50. how it works. More info at end of this file.
  51.  
  52. The original Slurp is one-way: it transmits lines in a desktop tab-delimited
  53. text file sent over a serial connection into Newton soup entries. Slurpee is
  54. two-way: it can also send Newton soup entries as a tab-delimited text file.
  55. (This combines functionality you'd find in the DTS SerialPro example and the
  56. freeware Pour utility).  Slurpee also works both ways in converting between
  57. multiline text paragraphs and entries in the Notes soup.  I think I've fixed a
  58. few Slurp problems with disconnecting cleanly.  I also added a "para" datatype
  59. that's useful for adding a note to a Names entry, and a general "class:string"
  60. datatype.
  61.  
  62. The original minimalist Slurp interface has changed only in the title, and some
  63. additional status messages.  What's transferred and in which format is
  64. controlled on the desktop side. For example, to send data to your Newton, you
  65. tell Slurpee to Receive, and then send text containing soup name, format
  66. specification, and data, via your terminal emulator, usually as a file.  To
  67. send data from your Newton, you also set Slurpee to Receive; however, the text
  68. file you send contains a soup name and format specification, but no data --
  69. just a Dump command (this assumes you set up a log file to capture the data
  70. returned).  Directions on how to setup Slurp/Slurpee with a terminal emulator
  71. can be found in the original SlurpOld.txt and later in this file.
  72.  
  73. Slurpee 1.1 starts the connection automatically, and does not disconnect
  74. automatically -- in other words, you never need to tap "Receive" unless you've
  75. tapped "Disconnect".  Slurpee starts waiting immediately; after receiving each
  76. file, it beeps and waits for the next.  Note: if you have many (or long)
  77. transfers, you may wish to increase the Preferences:Sleep number so that your
  78. Newton does not go to sleep during a transfer and lose data. (I may allow you
  79. to change this in next version of Slurpee).
  80.  
  81. WARNING: since Slurpee can add or remove entries from your soups, please keep
  82. your information backed up, and follow the formats and commands carefully.
  83.  
  84. =====
  85. Slurpee Uses
  86.  
  87. Here is a summary of the four kinds of transfer supported by Slurpee:
  88.       direction                         soup
  89. ----------------------      -------------------------
  90. from desktop to Newton      1. any soup      2. Notes
  91. from Newton to desktop      3. any soup      4. Notes
  92.  
  93. =====
  94. 1. the original Slurp ("Slurp classic")
  95. first line    soup name, e.g., Names
  96. second line   frame specification, e.g., see SlurpOld.txt and CasioNam.tab 
  97. other lines   each tab-delimited line corresponds to an entry
  98. last line     BYE!
  99.  
  100. note: this only works with existing soups. Slurp/Slurpee does not create new
  101. soups (currently).
  102.  
  103. For Names, I've found that a phones field is required, otherwise the entries
  104. will generate errors later when you browse them.  At a minimum, you need
  105. something like phones: ["workPhone"] in your framespec, then an extra tab in
  106. your data entries to reflect an empty field.
  107.  
  108. If you'd like to add a text note to a Names entry (the text field you see when
  109. you Show:Card&Notes), include notes: ["para"] in the frame spec. In the data
  110. entries, the text in this position up to the next tab (or end of line if it's
  111. last) will be included as a single paragraph in the note field.
  112.  
  113. Version 1.1 adds support for "class:string" type for entrySpec so you can embed
  114. 'class' information for strings directly with the value. For a phone entry,
  115. you could specify "homePhone:555 1234" for input; you would also get this
  116. format if you DUMP!
  117.  
  118. =====
  119. 2. Slurp for Notes
  120. first line    Notes
  121. second line   frame specification, e.g.,
  122.   {labels: 'Business, viewFont: <fontspec>, height: <num>}**
  123. line1 text
  124. line2 more text
  125. -----         paragraph delimiter (at least 5 dashes)
  126. more lines
  127. -----
  128. BYE!
  129.  
  130. **the frame specification in 1) is more of a template with type information;
  131. for Notes, it is used to provide default values.  For labels, the value is a
  132. symbol corresponding to a folder destination, e.g., 'Personal, 'Business, or
  133. nil or 'nil (for Unfiled).
  134.  
  135. If viewFont is not specified, then the Note (for the Notepad) is created with
  136. the current default font set by the user in Styles. If viewFont is specified,
  137. it should be a font specification, e.g., a coded integer like 10241
  138. (userFont10) or font description like {family: 'espy, face: 0, size: 9} -- see
  139. Newt or NTK documentation.  I have included viewFont: 10241 in the .nwt files
  140. to be consistent with Newt's default.
  141.  
  142. If height is not specified, then Slurpee creates each Notepad entry with its
  143. calculated height (in version 1.0, each had a fixed height of 265 -- which was
  144. too large for some paragraphs, too short for others).  You can specify a fixed
  145. height, e.g., {labels: 'Personal, height: 100}. If the Notepad clips a long
  146. para, hold down on the note separator bar in the NotePad for several seconds,
  147. then drag it downwards (it disappears) & then let go -- the separator should
  148. jump to the end.
  149.  
  150. Note: if you include a symbol for labels slot that does not (yet) exist, be sure
  151. to do Edit Folders later on your Newton to add it -- otherwise, the only
  152. way you'll see these entries is via All Notes.
  153.  
  154. examples:
  155.  
  156. {labels: 'Business, viewFont: 10241} // what Newt normally uses
  157. {labels: 'Personal} // uses current default font (Styles)
  158. {labels: nil, viewFont: {family: 'espy, face: 0, size: 9}, height: 500}
  159. {} // Unfiled folder with default font and calculated height
  160. {labels: nil}  // same as {}
  161. {labels: 'nil} // same as {}
  162.  
  163.  
  164. Erase command:  if you know what you are doing (and have backed things up
  165. first), you can insert an ERASE! command as the third line for 1&2.  This
  166. erases all entries from the specified soup, or if you've specified labels in
  167. your frame spec (for Names or Notes), it erases just the entries in that
  168. folder.  This can be handy especially if want to get rid of many existing
  169. entries before adding new information.  Warning: this does not give you a
  170. dialog box asking to Confirm erasing of entries!!!  For example, if you edited
  171. Newt sources for your project on the desktop, and wanted to replace these
  172. completely on your Newton, you could do something like:
  173.  
  174. Notes
  175. {labels: 'Programming, viewFont: 10241}
  176. ERASE!
  177. createApp
  178. func()
  179. ...
  180. -----
  181. addFields
  182. func()
  183. ....
  184. -----
  185. BYE!
  186.  
  187.  
  188. =====
  189. 3. Slurp in reverse
  190. first line    soup name, e.g., Names
  191. second line   frame specification, e.g., CasioNam.dmp
  192. DUMP!
  193.  
  194. same powerful frame specification as in 1). entries are written to terminal
  195. emulator as tab-delimited lines in frame specification order.  To have Slurpee
  196. pause so that you can set up a log/capture file, include the number of seconds
  197. followed by a semi-colon, e.g., DUMP!10; .  Any data fields with text values
  198. that contain newlines will be transmitted as is (you may need to re-edit
  199. results into a true tab-delimited text format).
  200.  
  201. =====
  202. 4. Slurp for Notes, in reverse
  203. first line    Notes
  204. second line   frame specification, e.g., {labels: 'Business}**
  205. DUMP!
  206.  
  207. **this is used as a filter to copy entries from only that folder. it copies all
  208. text data entries from each Note (if it is non-empty text) as a paragraph. for
  209. example, see Business.dmp. entries are written as multi-line entries separated
  210. by -----.  see 3 for description of optional pause.
  211.  
  212.  
  213. =====
  214. How to Use (see SlurpOld.txt for further info):
  215.  
  216. - Download Slurpee to your Newton.
  217.  
  218. - Serial cable (still) connected to the Newton, with no other open serial
  219.   connections on the desktop side (e.g., NTK inspector), or any other
  220.   current use of comms on the Newton (e.g., beaming).
  221.  
  222. - Open a communications program (e.g., terminal emulator) on your desktop
  223.   system, with the following specs:
  224.     Serial Tool, 9600 baud, 8 data bits, 1 stop bit, XON/XOFF handshaking
  225.  
  226.   - For file transfer, specify the Text Tool.
  227.  
  228. - Open Slurpee; it is automatically starts in Receive mode. Or, if you have
  229.   tapped Disconnect, then tap Receive.
  230.  
  231. - On the Mac/PC, choose "Send File..." in the comm program, and choose the
  232.   file to be sent.  If you are doing a "Dump", immediately setup a file to
  233.   log/receive/capture the result.  Slurpee will display the number of entries
  234.   received/dumped in a view near the top of the screen.  When the file
  235.   transfer is complete, Slurpee will automatically wait for another transfer.
  236.   
  237. - Tap Disconnect to end the connection, or just Quit.
  238.  
  239.  
  240. =====
  241. Slurpee Change History
  242.  
  243. 1.1 (9/3/94)
  244. -----
  245. see Slurpee.1st
  246.  
  247. 1.0 (6/6/94)
  248. -----
  249. - initial public release
  250. - added 10 second delay after a DUMP! to allow time to log/receive/capture a file
  251. - added an ERASE! command to clear out all soup entries or just those in a folder
  252. - added a "para" datatype (useful for adding a note to a Names card)
  253. - disconnects more cleanly
  254.  
  255. 0.1
  256. -----
  257. - alpha/beta releases to Newt users
  258.  
  259.  
  260. =====
  261. Author
  262.  
  263. Stephen Weyer
  264. 17 Timber Knoll Drive
  265. Washington Crossing, PA 18977-1052
  266. Internet: weyer@guest.apple.com
  267. America Online/eWorld/NewtonMail: SteveWeyer
  268. Compuserve: 74603,2051
  269. AppleLink: WEYER.S
  270.  
  271.  
  272. =====
  273. Info about Newt
  274.  
  275. Newt 2.3:
  276. a native development environment for simple applications using NewtonScript,
  277. and for creating graphics using gestures, buttons, and NS.
  278.  
  279. Keywords: object-oriented programming, application development environment,
  280. NewtonScript, NTK, learning, graphics, mathematics, Logo.
  281.  
  282. Where to usually find Newt [newt-devenv-23.sit / .hqx]:
  283. - internet (also see mirror sites):
  284.   - newton.uiowa.edu:pub/newton/software/app/ or /dev
  285.   - sumex-aim.stanford.edu:info-mac/nwt/app/
  286.   - ftp.amug.org:pub/newton
  287. - newsgroups: comp.binaries.newton
  288. - America Online(AOL): PDA:New Files (or PDA:Software Libraries:Newton)
  289. - Compuserve: GO NEWTON (DL 8 or 9)
  290. - AppleLink: Newton:Newton User Discussions:Freeware, Shareware and Demos
  291. - eWorld: Shareware:Newton
  292.   
  293. Newt is shareware ($35) -- registered users receive a manual describing Newt
  294. features and NewtonScript syntax, along with a floppy of other packages and
  295. source examples -- of particular interest may be the Slurpee application
  296. source itself in Slurpee format for Newt.
  297.